package com.bw.a2207a.view.adapter

import android.content.Context
import android.graphics.Color
import android.widget.ImageView
import com.bw.a2207a.R
import com.bw.a2207a.bean.CommentBean
import com.bw.a2207a.util.GlideUtil
import com.zhy.adapter.recyclerview.CommonAdapter
import com.zhy.adapter.recyclerview.base.ViewHolder

/**
 *
 * @ClassName: HomeGoodsAdapter
 * @Description: java类作用描述
 * @Author: zhangyanchao
 * @CreateDate: 2024/9/19 8:42 AM
 * @Version: 1.0
 */
class CommentAdapter(context: Context?, layoutId: Int, data: List<CommentBean>) :
    CommonAdapter<CommentBean>(context, layoutId, data) {
    override fun convert(holder: ViewHolder?, t: CommentBean, position: Int) {
        holder?.getView<ImageView>(R.id.iv)?.let { GlideUtil.loadCircleImg(mContext, t.icon, it) }
        holder?.setText(R.id.tv_name, t?.username)
        holder?.setText(R.id.tv_msg, t?.msg)
        holder?.setText(R.id.tv_time, t?.createtime)

    }
}